<template>
  <div class="container" v-loading="seatStore.historyView.isLoading">
    <div class="header">
      <div class="title">
        <el-icon
          :class="[seatStore.historyView.isLoading ? 'is-loading' : '']"
          size="24px"
        >
          <Orange />
        </el-icon>
        <span style="padding-left: 8px">扇区历史查询</span>
      </div>
      <query-view />
    </div>
    <el-tabs v-model="activeTabName" @tab-click="handleTabClick">
      <!-- type="border-card" -->
      <el-tab-pane name="detail" label="扇区明细">
        <history-view />
      </el-tab-pane>
      <el-tab-pane name="summary" label="按日统计">
        <summary-view />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup>
import { ref, computed } from "vue";
import QueryView from "./QueryView/index.vue";
import HistoryView from "./HistoryView/index.vue";
import SummaryView from "./SummaryView/index.vue";
import useSeatStore from "@/store/seat.js";
const seatStore = useSeatStore();
const activeTabName = ref("summary");
const handleTabClick = () => {};
</script>

<style scoped>
.title {
  font-size: 18px;
  font-weight: bolder;
  padding: 8px 0 16px 0;
  display: flex;
  align-items: center;
  color: var(--el-text-color-regular);
}

.header {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.container {
  padding: 16px 24px;
}
</style>
